package com.yi.mall.pay.service.Impl;

import com.alipay.api.AlipayClient;
import com.alipay.api.DefaultAlipayClient;
import com.alipay.api.domain.AlipayTradeQueryModel;
import com.alipay.api.request.AlipayTradeQueryRequest;
import com.alipay.api.response.AlipayTradeQueryResponse;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.yi.mall.common.model.PayLog;
import com.yi.mall.pay.config.AlipayConfiguration;
import com.yi.mall.pay.mapper.PayLogMapper;
import com.yi.mall.pay.service.IPayLogService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 支付记录表 服务实现类
 * </p>
 *
 * @author zzy
 * @since 2025-07-30
 */
@Service
public class PayLogServiceImpl extends ServiceImpl<PayLogMapper, PayLog> implements IPayLogService {

    @Override
    public PayLog queryByOrderId(String orderId) {
        LambdaQueryChainWrapper<PayLog> query = new LambdaQueryChainWrapper<>(baseMapper);
        PayLog payLog = query.eq(PayLog::getOrderId, orderId).one();
        return payLog;
    }

}
